template<class T>
void readInCibulkova2016(T myAst[], long indLastMPC, long indLastNumbMPC, string* ids, long nIds)
{
  string line;
  ifstream myfile ("lowell_id_lambda_beta_ab");
  long ind;
  AsteroidWithPole ast;
  
  if (myfile.is_open())
  {
    while ( getline (myfile,line))
      if (line.length()>1)
	{
	  // convert linefile to asteroid
	  sscanf(&line.at(0),"%ld %f %f %f",
		 &ast.Number, &ast.lambdaCibuki, &ast.betaCibuki, &ast.a_bCibuki);
      	  // if the asteroid is Numbered in the file assing it
	  if (ast.Number>0)
	    {
	      myAst[ast.Number-1].lambdaCibuki=ast.lambdaCibuki;
	      myAst[ast.Number-1].betaCibuki=ast.betaCibuki;
	      myAst[ast.Number-1].a_bCibuki=ast.a_bCibuki;
	    }
	  else
	    {
	      // can you match is right there ?
	      if ((ind = findUnnumberedAst(myAst,ast,indLastMPC,indLastNumbMPC+1))>=0) // YES ! 
		{
		  myAst[ind].lambdaCibuki=ast.lambdaCibuki;
		  myAst[ind].betaCibuki=ast.betaCibuki;
		  myAst[ind].a_bCibuki=ast.a_bCibuki;
		  //		  cout << ">>match 1  " << ast.pack << endl;
		}
	      else
		{ // the designation could not be matched.
		  // try to see if the asteroid has been numbered LATER
		  ast.findId(ids,nIds);
		  if (ast.Number>0)
		    {
		      myAst[ast.Number-1].lambdaCibuki=ast.lambdaCibuki;
		      myAst[ast.Number-1].betaCibuki=ast.betaCibuki;
		      myAst[ast.Number-1].a_bCibuki=ast.a_bCibuki;
		      //		      cout << ">>match 2  " << ast.pack << endl;
		    }
		  else
		    {
		      if ((ind = findUnnumberedAst(myAst,ast,indLastMPC,indLastNumbMPC+1))>=0) // YES ! 
			{
			  myAst[ind].lambdaCibuki=ast.lambdaCibuki;
			  myAst[ind].betaCibuki=ast.betaCibuki;
			  myAst[ind].a_bCibuki=ast.a_bCibuki;
			  //			  cout << ">>match 23  " << ast.pack << endl;
			}
		      else
			{
			  cout << ">>match FAILED  " << ast.pack << "--" << line << endl;
			}
		    }
		}
	    }
	}
    myfile.close();
  }
  else cout << "Unable to open file"; 
}
